[stack 20/20] spec(gazprea): permit nested aggregates and n-d arrays - #138
Closed
Sir-NoChill wants to merge 1 commit into
Closed
[stack 20/20] spec(gazprea): permit nested aggregates and n-d arrays#138Sir-NoChill wants to merge 1 commit into
Sir-NoChill wants to merge 1 commit into
Conversation
Sir-NoChill
marked this pull request as ready for review
August 21, 2026 19:03
Open the type system to the settled "arbitrary nesting and arbitrary structs" decision. Vectors, structs, tuples, and arrays may now hold any storable element or field type, and fixed-size arrays generalize from the two-dimensional matrix ceiling to arbitrary rank (T[n1]...[nk]). This reverses the vector element-type restriction and the bans on nesting structs/tuples inside structs and tuples. A single authoritative rule lives at ssec:storable_types (types.rst): everything except streams is storable; nesting is unbounded but must be acyclic through value types; recursion is legal only through a vector, the sole point of indirection. Each per-type page now defers to it, and array.rst's element-type list is widened to match. The >=2 field/element arity requirement is unchanged. Rank-agnostic operations (a shape interface, n-d matrix multiply, broadcasting) are left to a follow-up revision. Refs: #132 #106 #82 #71 #101 #86 Assisted-by: Agent (claude) <ai@blobfish.icu>
Sir-NoChill
force-pushed
the
feat/nested-composite-types
branch
from
August 21, 2026 19:05
6147b1f to
f21f38c
Compare
Collaborator
Author
Sir-NoChill
added a commit
that referenced
this pull request
Aug 21, 2026
Begin folding PR #106 into the consolidated spec, with review decisions. - glossary: define `initialization` (renames #106's contested "elaboration") and `zero value` (RAII-const default; array padding). - types/array.rst: new Sizing section and an Array-vs-Vector table, both stated for arrays of any rank per #138 -- not 2-D / base-type-only. - Remove the `by` (stride) operator and `StrideError` entirely (it implies array views, which have no efficient implementation): the Stride operation, the precedence-table row, and the stride examples are gone. - Concatenating two scalars is now a `TypeError`; at least one operand of `||` must be a composite value. Refs #106. Assisted-by: Agent (claude) <ai@blobfish.icu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Open the type system to the settled "arbitrary nesting and arbitrary
structs" decision. Vectors, structs, tuples, and arrays may now hold any
storable element or field type, and fixed-size arrays generalize from the
two-dimensional matrix ceiling to arbitrary rank (T[n1]...[nk]). This
reverses the vector element-type restriction and the bans on nesting
structs/tuples inside structs and tuples.
A single authoritative rule lives at ssec:storable_types (types.rst):
everything except streams is storable; nesting is unbounded but must be
acyclic through value types; recursion is legal only through a vector,
the sole point of indirection. Each per-type page now defers to it, and
array.rst's element-type list is widened to match.
The >=2 field/element arity requirement is unchanged. Rank-agnostic
operations (a shape interface, n-d matrix multiply, broadcasting) are
left to a follow-up revision.
Refs: #132 #106 #82 #71 #101 #86
Assisted-by: Agent (claude) ai@blobfish.icu
Stack created with GitHub Stacks CLI • Give Feedback 💬